package dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import pojo.Sign;

public interface SignDao {


	//用户不是第一次进行签到/更新数据
	public int updataSign(Sign sign);
	
	//根据用户id查询是否第一次签到
	@Select(value="select * from sign where user_id=#{userId}")
	@Results({
		@Result(column="sign_id",property="signId",id=true),
		@Result( column="user_id",property="userId"),
		@Result(column="sign_date",property="signDate"),
		@Result(column="sign_continuity",property="signContinuity")
	})
	public Sign selectRecord(Integer userId);
	
	//判断用户是否已经签到
	public Sign selectSignOrNot(@Param("userId")Integer userId);
}
